Skip to content

Tighten operator-facing diagnostics - #31

Merged
ausimian merged 2 commits into
release/1.0.0from
issue/29-error-messages
Aug 24, 2026
Merged

Tighten operator-facing diagnostics#31
ausimian merged 2 commits into
release/1.0.0from
issue/29-error-messages

Conversation

@ausimian

Copy link
Copy Markdown
Owner

Summary

  • shorten and standardise Castle's operator-facing errors and warnings
  • distinguish preflight refusals from attempted release operations
  • report configuration and restart-marker state without over-claiming
  • render filesystem failures consistently while preserving useful reason identity
  • update exact-output, lifecycle, and race coverage plus the design record

Release-management behavior is unchanged. The restart-marker race changes only carry observed :removed | :absent state into diagnostic rendering.

Validation

  • mix precommit
  • 186 tests, 0 failures
  • 90.34% coverage
  • Credo clean

Independent review

Claude adversarial review ran for the configured five-round cap. All 20 findings were fixed; the three findings raised in the final round were fixed after the cap and verified locally, but were not sent through an unbounded sixth Claude round. The PR is being sent for Codex review as the post-push review gate.

Closes #29

Closes #29

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
@ausimian

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3d6143c43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/castle/commands.ex Outdated
`do_make_permanent/2` writes `releases/start_erl.data` through
`set_permanent_files/5` before `write_releases/3` updates the release
record, and a throw from that write - or from the Windows service
update or the `ok = init:make_permanent/2` after it - is caught by
`handle_call/3` and returned as `{:error, reason}`. So a returned error
can arrive with the file that decides what an ordinary restart boots
already naming the target.

Saying Castle "did not make it permanent" therefore asserted the
absence of an effect that may have happened, and told an operator the
rollback still held when it may not - which is the part they act on.
Report the commit as possibly partial instead, name the file that may
already select the version, and direct them to `bin/castle releases`.

The test's refutation is the discriminator: the previous wording keeps
every other assertion in that case green.

Claude-Session: https://claude.ai/code/session_01RotroiBdbidiCRX3KqE3Dy

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ausimian

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: c8a2ac5feb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ausimian
ausimian merged commit 0c135e6 into release/1.0.0 Aug 24, 2026
7 checks passed
@ausimian
ausimian deleted the issue/29-error-messages branch August 24, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant